import request from '@/utils/request'

const api = {
    roleList: '/role/lists',
    roleAdd: '/role/add',
    roleEdit: '/role/edit',
    roleDelete: '/role/delete'
}

export function getRoleList (parameter) {
    return request({
      url: api.roleList,
      method: 'get',
      params: parameter
    })
}

export function roleAdd (parameter) {
    return request({
      url: api.roleAdd,
      method: 'post',
      data: parameter
    })
}

export function roleEdit (parameter) {
    return request({
      url: api.roleEdit,
      method: 'post',
      data: parameter
    })
}

export function roleDelete (parameter) {
    return request({
      url: api.roleDelete,
      method: 'get',
      params: parameter
    })
}
